<%@ page import="Navigator.student.StudentDao" %>
<%@ page import="Navigator.student.StudentEnity" %>
<%@ page import="Worker.WorkerDao" %>
<%@ page import="Worker.WorkerEnity" %>
<%@ page import="TeachLesson.TeachLessonsDao" %>
<%@ page import="TeachLesson.techLessonEnity" %>
<%@ page import="java.util.ArrayList" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/8/18
  Time: 16:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>教师个人主页</title>
    <link href="/SystemerNav/SystemerNav.css" rel="stylesheet" type="text/css">
    <link href="/Teachers/TeacherNav.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<%
    WorkerDao workerDao=new WorkerDao();
    WorkerEnity workerEnity=workerDao.getWorker(request.getParameter("workerNo"));
    TeachLessonsDao teachLessonsDao=new TeachLessonsDao();
    ArrayList <techLessonEnity> list =teachLessonsDao.getTeachDetail(request.getParameter("workerNo"));
%>
<body background="/LoginInterface/loginFace.jpg">
     <div class="container">
         <div class="top">
             欢迎教师:<%=workerEnity.getWorkerName()%><br>
             登陆时间:<p id="nowTimes"></p>
         </div>
         <div class="bottom">
             <table class="table table-striped">
              <caption>课程列表</caption>
                 <tr><td width="250px">课程编号</td>
                     <td width="300px">课程名</td>
                     <td width="250px">管理</td>
                 </tr>
                 <%for (techLessonEnity temp:list){%>
                 <tr class="active">
                     <td width="250px"><%=temp.getWorkerNO()%></td>
                     <td width="300px"><%=temp.getCourseName()%></td>
                     <td width="250px">
                         <form action="courseMangement.jsp" method="post">
                             <input type="hidden" name="workerNo" value="<%=temp.getWorkerNO()%>">
                             <input type="hidden" name="courseNo" value="<%=temp.getCourseNo()%>">
                             <input type="submit" name="submit" value="课程管理">
                         </form>

                     </td>
                 </tr>
                 <%}%>
             </table>
         </div>
     </div>
</body>
<script type="text/javascript">
    var now=new Date();
    var year=now.getFullYear();
    var month=now.getMonth()+1;
    var date=now.getDate();
    var hour=now.getHours();
    var minutes=now.getMinutes();
    var seconds=now.getSeconds();
    document.getElementById("nowTimes").innerHTML=year+'年'+month+"月"+date+"日"+hour+"时"+minutes+"分"+seconds+"秒";
</script>
</html>
